<template>
  <div>
    <div class="img-box" @click="fun">
      <slot></slot>
    </div>
    <el-dialog :visible.sync="dialogVisible">
      <div class="img-box-two">
        <slot></slot>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data(){
    return{
      dialogVisible: false,
    }
  },
  methods:{
    fun(){
      this.dialogVisible = true;
    }
  }
}
</script>
<style lang="less" scoped>
.img-box{
  width: 150px;
  height: 150px;
  cursor: pointer;
}
.img-box-two{
  display: flex;
  justify-content: center;
  align-items: center;
}
img{
  width: 100%;
  height: 100%;
}
</style>
